<!DOCTYPE html>
<html lang="zh-cn">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
		<meta name="renderer" content="webkit">
		<title>菜单管理</title>
		<import type='css' file="admin.pintuer4.css.pintuer" />
		<import type='css' file="admin.pintuer4.css.admin" />
		<link type="image/x-icon" href="http://www.pintuer.com/favicon.ico" rel="shortcut icon" />
		<link href="http://www.pintuer.com/favicon.ico" rel="bookmark icon" />
	</head>

	<body>
		<include file="Public:header" />
	<!--内容-->
		
		<div class="admin">
		<form method="post">
	    <div class="panel admin-panel">
	    	<div class="panel-head"><strong>菜单列表</strong></div>
	        <div class="padding border-bottom">
	            <a class="button button-small border-green" href="{:U('Menu/menu_add')}" >添加一级菜单</a>
	            <a class="button button-small border-green" href="{:U('Menu/sub_menu_add')}" >添加二级菜单</a>
	        </div>
	        <table class="table table-hover">
	        	<tr>
	        		<th>名称</th>
	        		<th>ACTION</th>
	        		<th>FUNCTION</th>
	        		<th>排序</th>
	        		<th>操作</th>
	        	</tr>
	        	<volist name="menu_arr_list" id="m">
				<tr style="background-color: #f5f5f5;">
					<td style="font-weight: bold;">{$m.name}</td>
					<td></td>
					<td></td>
					<td>{$m.sort}</td>
					<td><a class="button border-blue button-little dialogs"
						href="{:U('Menu/menu_edit')}?id={$m.id}">修改</a>
						<a class="button border-yellow button-little"
						href="{:U('Menu/menu_delete')}?id={$m.id}"
						onclick="{if(confirm('确认删除?')){return true;}return false;}">删除</a>
					</td>
				</tr>
	        	<volist name="m.sub_menu" id="sub_m">
	        	<tr>
		        	<td>{$sub_m.name}</td>
		        	<td>{$sub_m.action}</td>
		        	<td>{$sub_m.function}</td>
		        	<td>{$sub_m.sort}</td>
		        	<td><a class="button border-blue button-little dialogs"
						href="{:U('Menu/menu_edit')}?id={$sub_m.id}">修改</a>
						<a class="button border-yellow button-little"
						href="{:U('Menu/menu_delete')}?id={$sub_m.id}"
						onclick="{if(confirm('确认删除?')){return true;}return false;}">删除</a>
					</td>
				</tr>
	        	</volist>
	        	</volist>
	        </table>
	    </div>
	    </form>
	    </div>
		<!--底部-->
		<import type='js' file="admin.pintuer4.js.jquery" />
		<import type='js' file="admin.pintuer4.js.pintuer" />
		<import type='js' file="admin.pintuer4.js.respond" />
		<import type='js' file="admin.pintuer4.js.layer" />
		<import type='js' file="admin.pintuer4.js.admin" />
		<script>
			$(function() {
				
				//大于移动端800宽度才弹出提示
				if ($(window).width() >= 800) {
					layer.open({
						type: 1,
						shade: false,
						title: false, //不显示标题
						area: ['420px', '640px'],
						content: $('#alert-talk'), //捕获的元素
						cancel: function(index) {
							layer.close(index);
						}
					});
				}
			});
		</script>
	</body>

</html>